<template>
  <div class="container">
    <!-- <h2 :class="['类名1', '类名2']">组件的样式问题</h2> -->
    <!-- <h2 :class="['abc',flag ? 'thin' : '']">组件的样式问题</h2> -->

    <!-- <h2 :class="{类名1: 布尔值, 类名2: 布尔值, }">组件的样式问题</h2> -->
    <h2 :class="{abc: true, thin: flag}">组件的样式问题</h2>

    <button @click="flag = !flag">切换类名</button>
    <!-- <p :style="{样式名称: 值, 样式名称: 值}">这是App组件中的p标签</p> -->
    <p :style="{padding: '20px', fontSize: '20px'}">这是App组件中的p标签</p>
    <my-left></my-left>
  </div>
</template>

<script>
import MyLeft from "./components/MyLeft.vue";
export default {
  data () {
    return {
      flag: true
    }
  },
  components: { MyLeft },
};
</script>

<style lang="less" scoped>
.abc {
  color: red
}
.thin {
  font-weight: 200;
}

.container {
  background-color: aliceblue;
  h2 {
    font-style: 24px;
  }
}

p {
  color: blue;
}

.container /deep/ .chp {
  background-color: orange;
}
</style>